from django.conf.urls import url,include
from django.urls import path
from machine import views

app_name = 'machine'
urlpatterns = [
    url(r'^$',views.index,name='index'),
    url(r'^register/$',views.register,name='register'),
    url(r'^logout/$',views.logout_codeuser,name='loguserout'),
    url(r'^login/$',views.login_codeuser,name='loguserin'),
    url(r'^message/$',views.message,name='message'),
    url(r'^add_problem/$',views.add_problem,name='add_problem'),
    url(r'^problems/$',views.all_problems,name="add_problems"),
    url(r'^problems/(?P<pid>[\w\-]+)$',views.view_problem,name="view_problem"),
    url(r'^submit/(?P<pid>[\w\-]+)$',views.submit_code,name='submit'),
    url(r'^submission/(?P<submission_id>[\d]+)$',views.view_submission,name='view_sub'),
    url(r'^blogs/$',views.djangoblog,name='blogs'),
    url(r'^games/$',views.games,name='games'),
    url(r'^about/$',views.about,name='about'),
    #url(r'^posts/<int:pk>/$',views.detail,name='detail'),
    path('posts/<int:pk>/',views.detail,name='detail'),
    path('archives/<int:year>/<int:month>/', views.archive, name='archive'),
    path('tags/<int:pk>/', views.tag, name='tag'),
]
